package org.itboys.store.dto;

import org.itboys.dto.ProductImage;

import java.text.DecimalFormat;
import java.util.List;

/**
 * 商品详情DTO
 * @author 王架构.niubility
 *
 */
public class ProductDetail {

	private Long id;
	private Long brandId;
	private Integer type;
	private Long catId;//产品分类ID
	private String catName;//产品分类名称
	private Double realPrice;//平台定义的产品售价
	private Double marketPrice;//市场价

	private int soldCount = 0;//总销量
	private long readCount = 0L; //浏览次数 可以不考虑

	private boolean isHot;//是否今日最热  默认否
	private boolean isRecommend;//是否推荐   默认否
	private boolean isSpecial;//是否今日特卖
	private boolean isGood;//是否好货

	private boolean isLimit;//是否参与限时购
	private String limitStartTime;//限时购开始时间
	private String limitEndDate;//限时购结束时间
	private Double scale;//提成比例
	private int postage;//邮费

	/******满减包邮规则*******/
	private int pricePinkage;//价格满减包邮
	private String numPinkage;//数量满减包邮
	private int numPinkageInt;

	/************以下字段是从海仓接口同步过来的信息*************/
	private String goodsId;//产品id
	private Integer store;//库存
	private String skuId;
	private String title;//产品标题
	private String subTitle;
	private String shortTitle;
	private String brandName;
	private String category;
	private Double suggestPrice;
	private String imageUrl;
	private String detail;
	private String skuProperty;
	private String goodsProperty;
	private Integer onlineStatus;
	private String storage;
	private Double taxRate;
	private Double price;
	private List<ProductImage> imgList;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Long getCatId() {
		return catId;
	}

	public void setCatId(Long catId) {
		this.catId = catId;
	}

	public String getCatName() {
		return catName;
	}

	public void setCatName(String catName) {
		this.catName = catName;
	}

	public Double getRealPrice() {
		DecimalFormat df   = new DecimalFormat("######0.00");
		return Double.valueOf(df.format(realPrice));
	}

	public void setRealPrice(Double realPrice) {
		this.realPrice = realPrice;
	}

	public String getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(String goodsId) {
		this.goodsId = goodsId;
	}

	public Integer getStore() {
		return store;
	}

	public void setStore(Integer store) {
		this.store = store;
	}

	public String getSkuId() {
		return skuId;
	}

	public void setSkuId(String skuId) {
		this.skuId = skuId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getSubTitle() {
		return subTitle;
	}

	public void setSubTitle(String subTitle) {
		this.subTitle = subTitle;
	}

	public String getShortTitle() {
		return shortTitle;
	}

	public void setShortTitle(String shortTitle) {
		this.shortTitle = shortTitle;
	}

	public String getBrandName() {
		return brandName;
	}

	public void setBrandName(String brandName) {
		this.brandName = brandName;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public Double getSuggestPrice() {
		return suggestPrice;
	}

	public void setSuggestPrice(Double suggestPrice) {
		this.suggestPrice = suggestPrice;
	}

	public String getImageUrl() {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public String getSkuProperty() {
		return skuProperty;
	}

	public void setSkuProperty(String skuProperty) {
		this.skuProperty = skuProperty;
	}

	public String getGoodsProperty() {
		return goodsProperty;
	}

	public void setGoodsProperty(String goodsProperty) {
		this.goodsProperty = goodsProperty;
	}

	public Integer getOnlineStatus() {
		return onlineStatus;
	}

	public void setOnlineStatus(Integer onlineStatus) {
		this.onlineStatus = onlineStatus;
	}

	public String getStorage() {
		return storage;
	}

	public void setStorage(String storage) {
		this.storage = storage;
	}

	public Double getTaxRate() {
		return taxRate;
	}

	public void setTaxRate(Double taxRate) {
		this.taxRate = taxRate;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public List<ProductImage> getImgList() {
		return imgList;
	}

	public void setImgList(List<ProductImage> imgList) {
		this.imgList = imgList;
	}

	public boolean isHot() {
		return isHot;
	}

	public void setHot(boolean hot) {
		isHot = hot;
	}

	public boolean isRecommend() {
		return isRecommend;
	}

	public void setRecommend(boolean recommend) {
		isRecommend = recommend;
	}

	public boolean isSpecial() {
		return isSpecial;
	}

	public void setSpecial(boolean special) {
		isSpecial = special;
	}

	public boolean isGood() {
		return isGood;
	}

	public void setGood(boolean good) {
		isGood = good;
	}

	public boolean isLimit() {
		return isLimit;
	}

	public void setLimit(boolean limit) {
		isLimit = limit;
	}

	public String getLimitStartTime() {
		return limitStartTime;
	}

	public void setLimitStartTime(String limitStartTime) {
		this.limitStartTime = limitStartTime;
	}

	public String getLimitEndDate() {
		return limitEndDate;
	}

	public void setLimitEndDate(String limitEndDate) {
		this.limitEndDate = limitEndDate;
	}

	public Double getScale() {
		DecimalFormat df   = new DecimalFormat("######0.00");
		return Double.valueOf(df.format(marketPrice));
	}

	public void setScale(Double scale) {
		this.scale = scale;
	}

	public Long getBrandId() {
		return brandId;
	}

	public void setBrandId(Long brandId) {
		this.brandId = brandId;
	}

	public Double getMarketPrice() {
		return marketPrice;
	}

	public void setMarketPrice(Double marketPrice) {
		this.marketPrice = marketPrice;
	}

	public int getSoldCount() {
		return soldCount;
	}

	public void setSoldCount(int soldCount) {
		this.soldCount = soldCount;
	}

	public long getReadCount() {
		return readCount;
	}

	public void setReadCount(long readCount) {
		this.readCount = readCount;
	}

	public int getPricePinkage() {
		return pricePinkage;
	}

	public void setPricePinkage(int pricePinkage) {
		this.pricePinkage = pricePinkage;
	}

	public String getNumPinkage() {
		return numPinkage;
	}

	public void setNumPinkage(String numPinkage) {
		this.numPinkage = numPinkage;
	}

	public int getPostage() {
		return postage;
	}

	public void setPostage(int postage) {
		this.postage = postage;
	}

	public int getNumPinkageInt() {
		return numPinkageInt;
	}

	public void setNumPinkageInt(int numPinkageInt) {
		this.numPinkageInt = numPinkageInt;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
}
